package com.shangxia.dreaming.business;

import com.shangxia.dreaming.business.pojo.Sevenob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * @ProjectName: dreaming
 * @ClassName: StartJob
 * @Time: 2020/10/5
 * @Author: zhouy
 * @Description:
 * @Experience:
 */

@Slf4j
@Component
public class StartJob {

    @Resource
    private FirstJob firstJob;
    @Resource
    private SecondJob secondJob;
    @Resource
    private ThreeJob threeJob;
    @Resource
    private FourJob fourJob;
    @Resource
    private FiveJob fiveJob;
    @Resource
    private SixJob sixJob;
    @Resource
    private Sevenob sevenob;
    @Resource
    private EightJob eightJob;
    public void doWork(String type) throws Exception {
        switch (type) {
            case "15-5-3":
            case "15-5-4":
            case "11-5-4":
            case "11-5-3":
            case "11-5-2":
//            case "11-3-2":
                firstJob.work();
                break;
            case "11-3-4":
                //真号 3 个  4个位置组合比对
            case "11-3-3":
                //真号 3 个  3个位置组合比对
                secondJob.work();
                break;
            case "11-3-2-1-2":
            case "11-3-2-1-3":
            case "11-3-2-2-3":
                //三个真号，取两位对比
                threeJob.work();
                break;
            case "10-3-1-2":
                //10个号码；3个真号；1个对比翻层；2连号一组；3组对比
                fiveJob.work();
                break;
            case "getCode":
                //10个号码；3个真号；1个对比翻层；2连号一组；3组对比
                sevenob.work();
                break;
            case "12-2-2":
                //12个号码；2个真号；
                eightJob.work();
                break;
            default:
                break;
        }
    }
}
